<script lang="ts" setup>
import { copyText } from "@@/utils/tools/project";
import { _require } from "@@/utils/tools/tools";
const props = defineProps<{
  copyText: string | undefined;
}>();
</script>

<template>
  <div class="CopyText T-nowrap">
    <slot></slot>
    <VanImage
      @click="copyText(props.copyText || '')"
      class="copy-icon active"
      :src="_require('src/assets/iconSvg/fu-zhi.svg')"
      height="1em"
    >
    </VanImage>
  </div>
</template>

<style lang="less" scoped>
.CopyText {
  vertical-align: middle;
}
.copy-icon {
  vertical-align: -0.1em;
  margin-left: 0.5em;
}
</style>
